package com.acsior.hibernate.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

import com.acsior.dac.impl.hibernate.vo.GeneratorKey;
import com.acsior.dac.impl.hibernate.vo.HibernatePersistantIntegerIdVO;

/**
 * Pobox entity. @author MyEclipse Persistence Tools <b><i>powered by
 * Belev</i></b>
 */
@Entity
@Table(name = "poboxes", uniqueConstraints = @UniqueConstraint(columnNames = { "structure_id",
		"box_number" }))
@GeneratorKey(tableName = "poboxes")
public class PoboxVO extends HibernatePersistantIntegerIdVO {

	private static final long serialVersionUID = -6952530689225564481L;

	@Column(name = "box_number", nullable = false)
	private Integer boxNumber;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "nom_box_dimension_id", nullable = false)
	private NomBoxDimensionVO nomBoxDimension;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "nom_box_status_id", nullable = false)
	private NomBoxStatusVO nomBoxStatus;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "structure_id", nullable = false)
	private StructureVO structure;

	/** default constructor */
	public PoboxVO() {
		super();
	}

	/** @return the boxNumber */
	public Integer getBoxNumber() {
		return this.boxNumber;
	}

	/** @return the nomBoxDimension */
	public NomBoxDimensionVO getNomBoxDimension() {
		return this.nomBoxDimension;
	}

	/** @return the nomBoxStatus */
	public NomBoxStatusVO getNomBoxStatus() {
		return this.nomBoxStatus;
	}

	/** @return the structure */
	public StructureVO getStructure() {
		return this.structure;
	}

	/**
	 * @param boxNumber
	 *            the boxNumber to set
	 */
	public void setBoxNumber(Integer boxNumber) {
		this.boxNumber = boxNumber;
	}

	/**
	 * @param nomBoxDimension
	 *            the nomBoxDimension to set
	 */
	public void setNomBoxDimension(NomBoxDimensionVO nomBoxDimension) {
		this.nomBoxDimension = nomBoxDimension;
	}

	/**
	 * @param nomBoxStatus
	 *            the nomBoxStatus to set
	 */
	public void setNomBoxStatus(NomBoxStatusVO nomBoxStatus) {
		this.nomBoxStatus = nomBoxStatus;
	}

	/**
	 * @param structure
	 *            the structure to set
	 */
	public void setStructure(StructureVO structure) {
		this.structure = structure;
	}

}